
import { createRouter, createWebHistory } from 'vue-router'  ;

//指定路由规则
const routes = [
  {
    path: '/',
    name: 'main',
   component: () => import('@/views/Main.vue'),
    redirect: '/home',
   children:[],
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/Login.vue'),
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@/views/404.vue'),
  },
];
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
});

export default router